package com.hall.items.aggr;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import dml.game.weapon.aggr.Weapon;

@Document
public class MyWeapon implements Weapon {

	private long id;
	private String code;
	private MyWeaponArchive archive;

	@Indexed
	private long playerId;

	public MyWeapon() {
	}

	public MyWeapon(MyWeaponArchive myWeaponArchive) {
		archive = myWeaponArchive;
	}

	@Override
	public Object getId() {
		return id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public void setId(Object id) {
		this.id = (long) id;
	}

	public MyWeaponArchive getArchive() {
		return archive;
	}

	public void setArchive(MyWeaponArchive archive) {
		this.archive = archive;
	}

	@Override
	public void setPlayerId(Object playerId) {
		this.playerId = (long) playerId;
	}

	@Override
	public Object getPlayerId() {
		return playerId;
	}

}
